<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta http-equiv="keywords" content="" />
<meta http-equiv="description" content="" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<link rel="stylesheet" type="text/css" href="/css/reset.css" />
<link rel="stylesheet" type="text/css" href="/css/common.css" />
<script type="text/javascript" src="/js/jquery-1.8.2.min.js"></script>
</head>

<body>
	<form action="/common/upload.dhtml" method="post" enctype="multipart/form-data">
		<input type="hidden" name="returnUrl" value="admin/advertise/upload" /> <input type="hidden" id="uploadFileName"
			name="uploadFileName" value="<c:out value="${uploadFileName }" />" /> <input type="hidden" name="newname"
			value="true" /> <input type="hidden" name="savePath" value="advertise/" />
		<table>
			<tr>
				<td>是否缩放</td>
				<td><select name="compress">
						<option value="true">压缩</option>
						<option value="false">不压缩</option>
				</select></td>
			</tr>
			<tr>
				<td>宽</td>
				<td><input type="text" name="width" /></td>
			</tr>
			<tr>
				<td>高</td>
				<td><input type="text" name="height" /></td>
			</tr>
			<tr>
				<td>文件</td>
				<td><input type="file" name="file" /></td>
			</tr>
			<tr>
				<td></td>
				<td><input type="submit" value="上传" /></td>
			</tr>
		</table>
	</form>
	<img src="" />
	<script type="text/javascript">
		//alert($("#uploadImg",parent.document.body).size());
		$("img").css({
			"display" : "none",
			"visibility" : "hidden",
			"height" : "60px"
		});
		if ("" != $("#uploadFileName").val()) {
			//alert($("#uploadFileName").val());
			$("#uploadImg", parent.document.body).val(
					$("#uploadFileName").val());
			$("img").attr("src", $("#uploadFileName").val());
			$("img").css({
				"display" : "block",
				"visibility" : "visible"
			});
		}
	</script>
</body>
</html>